using FreeSql.DataAnnotations;
using System;

namespace QntPlatform.Model
{


    public interface IEntityBase
    {
        object[] GetIds();
        void SetIds(object[] id);

    }
    public class EntityBase<T>: IEntityBase  where T : IConvertible
    {
        [Column(IsIdentity = true)]
        public T Id{get;set;}
        public   object[] GetIds() {
            return new object[]{Id};
        }
        public  void SetIds(params object[] id) {
            Id = (T)id[0]; 
        }
    }
    public class EntityBaseLong: EntityBase<long>
    {
    }
    public class EntityBaseString : EntityBase<string>
    {
    }
  
}